﻿<Application
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
	x:Class="YAOSXDockWannabe.App">
	<Application.Resources>
		<!-- Resources scoped at the Application level should be defined here. -->
        <ControlTemplate x:Key="TransparentButton" TargetType="Button">
            <Grid>
                <vsm:VisualStateManager.VisualStateGroups>
                    <vsm:VisualStateGroup x:Name="CommonStates">
                        <vsm:VisualState x:Name="Normal"/>
                        <vsm:VisualState x:Name="MouseOver">
                            <Storyboard/>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Pressed">
                            <Storyboard/>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Disabled">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                    </vsm:VisualStateGroup>
                    <vsm:VisualStateGroup x:Name="FocusStates">
                        <vsm:VisualState x:Name="Focused">
                            <Storyboard>
                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
                                    <SplineDoubleKeyFrame KeyTime="0" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </vsm:VisualState>
                        <vsm:VisualState x:Name="Unfocused" />
                    </vsm:VisualStateGroup>
                </vsm:VisualStateManager.VisualStateGroups>
                <ContentPresenter
    			x:Name="contentPresenter"
    			Content="{TemplateBinding Content}"
    			ContentTemplate="{TemplateBinding ContentTemplate}"
    			VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
    			HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
    			Margin="{TemplateBinding Padding}"/>
                <Rectangle x:Name="DisabledVisualElement" RadiusX="3" RadiusY="3" Fill="#FFFFFFFF" Opacity="0" IsHitTestVisible="false" />
                <Rectangle x:Name="FocusVisualElement" RadiusX="2" RadiusY="2" Margin="1" Stroke="#FF6DBDD1" StrokeThickness="0" Opacity="0" 
				IsHitTestVisible="false" />
            </Grid>
        </ControlTemplate>

    </Application.Resources>
</Application>
